package cn.fighter3.entity.node;

import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;

import java.util.HashSet;
import java.util.Set;

@NodeEntity
public class People {

    private String authorName;
    @Id
    private String authorId;

    @Relationship(type = "Authorof",direction = Relationship.INCOMING)
    private Set<Cnbook> authorCnbook = new HashSet<>();

    @Relationship(type = "Authorof",direction = Relationship.INCOMING)
    private Set<Fgbook> authorFgbook = new HashSet<>();

    @Relationship(type = "Authorof",direction = Relationship.INCOMING)
    private Set<Mscbook> authorMscbook = new HashSet<>();

    @Relationship(type = "Authorof",direction = Relationship.INCOMING)
    private Set<Mulbook> authorMulbook = new HashSet<>();

    @Relationship(type = "Authorof",direction = Relationship.INCOMING)
    private Set<Papbook> authorPapbook = new HashSet<>();


    @Relationship(type = "Authorof",direction = Relationship.INCOMING)
    private Set<Perbook> authorPerbook = new HashSet<>();


    @Relationship(type = "Lend",direction = Relationship.OUTGOING)
    private Set<Cnbook> lendCnbook = new HashSet<>();

    @Relationship(type = "Lend",direction = Relationship.OUTGOING)
    private Set<Fgbook> lendFgbook = new HashSet<>();

    @Relationship(type = "Lend",direction = Relationship.OUTGOING)
    private Set<Mscbook> lendMscbook = new HashSet<>();

    @Relationship(type = "Lend",direction = Relationship.OUTGOING)
    private Set<Mulbook> lendMulbook = new HashSet<>();

    @Relationship(type = "Lend",direction = Relationship.OUTGOING)
    private Set<Papbook> lendPapbook = new HashSet<>();


    @Relationship(type = "Authorof",direction = Relationship.INCOMING)
    private Set<Perbook> lendPerbook = new HashSet<>();

    public Set<Cnbook> getLendCnbook() {
        return lendCnbook;
    }

    public void setLendCnbook(Set<Cnbook> lendCnbook) {
        this.lendCnbook = lendCnbook;
    }

    public Set<Fgbook> getLendFgbook() {
        return lendFgbook;
    }

    public void setLendFgbook(Set<Fgbook> lendFgbook) {
        this.lendFgbook = lendFgbook;
    }

    public Set<Mscbook> getLendMscbook() {
        return lendMscbook;
    }

    public void setLendMscbook(Set<Mscbook> lendMscbook) {
        this.lendMscbook = lendMscbook;
    }

    public Set<Mulbook> getLendMulbook() {
        return lendMulbook;
    }

    public void setLendMulbook(Set<Mulbook> lendMulbook) {
        this.lendMulbook = lendMulbook;
    }

    public Set<Papbook> getLendPapbook() {
        return lendPapbook;
    }

    public void setLendPapbook(Set<Papbook> lendPapbook) {
        this.lendPapbook = lendPapbook;
    }

    public Set<Perbook> getLendPerbook() {
        return lendPerbook;
    }

    public void setLendPerbook(Set<Perbook> lendPerbook) {
        this.lendPerbook = lendPerbook;
    }


    //    public People(String authorName, String authorId, Set<Cnbook> authorCnbook, Set<Fgbook> authorFgbook, Set<Mscbook> authorMscbook, Set<Mulbook> authorMulbook, Set<Papbook> authorPapbook, Set<Perbook> authorPerbook) {
//        this.authorName = authorName;
//        this.authorId = authorId;
//        this.authorCnbook = authorCnbook;
//        this.authorFgbook = authorFgbook;
//        this.authorMscbook = authorMscbook;
//        this.authorMulbook = authorMulbook;
//        this.authorPapbook = authorPapbook;
//        this.authorPerbook = authorPerbook;
//    }


    public People(String authorName, String authorId) {
        this.authorName = authorName;
        this.authorId = authorId;
    }

    public People(){}





    public Set<Cnbook> getAuthorCnbook() {
        return authorCnbook;
    }

    public void setAuthorCnbook(Set<Cnbook> authorCnbook) {
        this.authorCnbook = authorCnbook;
    }

    public Boolean addcn(Cnbook from){
        return this.authorCnbook.add(from);
    }
    public Boolean addfg(Fgbook from){
        return this.authorFgbook.add(from);
    }
    public Boolean addmsc(Mscbook from){
        return this.authorMscbook.add(from);
    }
    public Boolean addmul(Mulbook from){
        return this.authorMulbook.add(from);
    }
    public Boolean addpap(Papbook from){
        return this.authorPapbook.add(from);
    }
    public Boolean addper(Perbook from){
        return this.authorPerbook.add(from);
    }

    public Boolean addcn2(Cnbook from){
        return this.lendCnbook.add(from);
    }
    public Boolean addfg2(Fgbook from){
        return this.lendFgbook.add(from);
    }
    public Boolean addmsc2(Mscbook from){
        return this.lendMscbook.add(from);
    }
    public Boolean addmul2(Mulbook from){
        return this.lendMulbook.add(from);
    }
    public Boolean addpap2(Papbook from){
        return this.lendPapbook.add(from);
    }
    public Boolean addper2(Perbook from){
        return this.lendPerbook.add(from);
    }


    public Set<Fgbook> getAuthorFgbook() {
        return authorFgbook;
    }

    public void setAuthorFgbook(Set<Fgbook> authorFgbook) {
        this.authorFgbook = authorFgbook;
    }

    public Set<Mscbook> getAuthorMscbook() {
        return authorMscbook;
    }

    public void setAuthorMscbook(Set<Mscbook> authorMscbook) {
        this.authorMscbook = authorMscbook;
    }

    public Set<Mulbook> getAuthorMulbook() {
        return authorMulbook;
    }

    public void setAuthorMulbook(Set<Mulbook> authorMulbook) {
        this.authorMulbook = authorMulbook;
    }

    public Set<Papbook> getAuthorPapbook() {
        return authorPapbook;
    }

    public void setAuthorPapbook(Set<Papbook> authorPapbook) {
        this.authorPapbook = authorPapbook;
    }

    public Set<Perbook> getAuthorPerbook() {
        return authorPerbook;
    }

    public void setAuthorPerbook(Set<Perbook> authorPerbook) {
        this.authorPerbook = authorPerbook;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }
}